<extend name="Home@Base/common" xmlns="http://www.w3.org/1999/html"/>
<block name="body">
    <div class="span9 page_message">
        <section id="contents"> <include file="Home@Addons/_nav" />
            <div class="tab-content">
                <php> $post_url || $post_url = U('applicationManage?model='.$model['id'], $get_param);</php>
                <form class="form-horizontal form-center" method="post" action="{$post_url}" id="form">
                    <div class="form-item cf">
                        <!--<label class="item-label" style="padding-left: 30%;font-weight: bold">查询条件: </label>-->
                        <hr>
                    </div>

                    <div class="form-item cf" style="float: left">
                        <label class="item-label"> 选择申请人<span class="check-tips"></span></label>
                        <div class="controls">
                            <select name="applyer" multiple="true">
                                <volist name="applyers" id="vo">
                                    <option value="{$vo.id}" {$vo.selected}>{$vo.name}</option>
                                </volist>
                            </select>
                        </div>
                    </div>

                    <div class="form-item cf" style="float: left">
                        <label class="item-label"> 选择审批人<span class="check-tips"></span></label>
                        <div class="controls">
                            <select name="approver" multiple="true">
                                <volist name="approvers" id="vo">
                                    <option value="{$vo.id}" {$vo.selected}>{$vo.name}</option>
                                </volist>
                            </select>
                        </div>
                    </div>

                    <div class="form-item cf" style="float: left">
                        <label class="item-label"> 选择部门<span class="check-tips"></span></label>
                        <div class="controls">
                            <select name="dept_id">
                                <volist name="depts" id="vo">
                                    <option value="{$vo.id}" {$vo.selected}>{$vo.name}</option>
                                </volist>
                            </select>
                        </div>
                    </div>

                    <div class="form-item cf" style="float: right">
                        <label class="item-label"> 选择报销类型<span class="check-tips"></span></label>
                        <div class="controls">
                            <select name="subtype">
                                <volist name="subtypes" id="vo">
                                    <option value="{$vo.id}" {$vo.selected}>{$vo.name}</option>
                                </volist>
                            </select>
                        </div>
                        <button class="button1" style="margin-left: 1%;margin-top: 40%;text-align: center;width: 120px;height: 30px" value='1' name="button_query">开始查询</button>
                    </div>

                <table>
                    <thead><tr>
                        <th>审批单号</th>
                        <th>申请人部门</th>
                        <th>申请人</th>
                        <th>报销类型</th>
                        <th>总金额</th>
                        <th>创建时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr></thead>
                    <volist name="applies" id="vo">
                        <tr>
                            <td>{$vo['apply_no']}</td>
                            <td>{$vo['dept_name']}</td>
                            <td>{$vo['emp_name']}</td>
                            <td>{$vo['type_name']}</td>
                            <td>{$vo['total_money']}</td>
                            <td>{$vo['submit_date']}</td>
                            <td><font color={$vo['show_state_color']}>{$vo['show_state']}</font></td>
                            <td><button name="button_del" value={$vo.id} onclick="delcfm()">删 除</button></td>
                        </tr>
                    </volist>
                </table>
                <div class="page"> {$_page|default=''} </div>
                </form>
            </div>
        </section>
    </div>
</block>

<block name="style">
    <style type="text/css">
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
        }
        table td, table th {
            border: 0px solid #cad9ea;
            color: #666;
            height: 30px;
            text-align: center;
        }
        table thead th {
            background-color: #CCE8EB;
            width: 100px;
        }
        table tr:nth-child(odd) {
            background: #fff;
        }
        table tr:nth-child(even) {
            background: #F5FAFA;
        }
    </style>
</block>

<block name="script">
    <script type="text/javascript">
    function delcfm() {
        if (!confirm("确认要删除？")) {
            window.event.returnValue = false;
        }
    }
    </script>
 </block>